package me.kevinwalker.core;

public class MongoDBTool {

    /**
     * 这里的host和port是默认的，并且这里的修改对外是可见的
     */
    private volatile static String host = "localhost";

    private volatile static int port = 27017;

    public static void setClientInfo(String host, int port) {
        MongoDBTool.host = host;
        MongoDBTool.port = port;
    }

    public static void setHost(String host) {
        MongoDBTool.host = host;
    }

    public static void setPort(int port) {
        MongoDBTool.port = port;
    }

    public static String getHost() {
        return host;
    }

    public static int getPort() {
        return port;
    }

}
